﻿<?xml version="1.0" encoding="utf-8" ?>
<AdoNetDataAccess connection="$SyrinxDBConnection$" formatter="bizobj of TreeNode">
	<Sql>
		SELECT TOP 1
			objectId as id,parentHostId, positionInParent, positionName
		FROM 
			ObjectTreeNodes 
		WHERE 
			parentId = @parentHostId AND id &lt;&gt; @parentHostId
		ORDER BY 
			positionInParent <code><![CDATA[sql.Append(info.get("sortDir") == null?"DESC":info.get("sortDir").ToString());]]></code>
	</Sql>
	<Param name="parentHostId" type="UniqueIdentifier"/>
</AdoNetDataAccess>
